package com.kiki.stater.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by mazeyi on 2020/12/9.
 */
@RestController
@RequestMapping("/hello")
public class TestController {

    @GetMapping("/jenkins")
    public String jenkins(HttpServletRequest request, HttpServletResponse response){
        System.out.println(request.getSession().getId());
        System.out.println(request.getSession().getAttribute("name"));
        request.getSession().setAttribute("name", "shanghaonan");
        return "hello jenkins";

    }
}